package xiangmu.schoolpaper.service.impl;

import xiangmu.schoolpaper.mapper.system.SelectTemplateTypeMapper; // 修正导入路径

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xiangmu.schoolpaper.service.system.SelectTemplateTypeService;

import java.util.List;

@Service
public class SelectTemplateTypeServiceImpl implements SelectTemplateTypeService {

    private final SelectTemplateTypeMapper selectTemplateTypeMapper;

    // 使用构造器注入代替字段注入
    @Autowired
    public SelectTemplateTypeServiceImpl(SelectTemplateTypeMapper selectTemplateTypeMapper) {
        this.selectTemplateTypeMapper = selectTemplateTypeMapper;
    }

    @Override
    public List<Double> getWeightsByTemplateId(Integer templateId) {
        return selectTemplateTypeMapper.selectWeightsByTemplateId(templateId);
    }
}